Integrand size = 27, antiderivative size = 114 \[ \int (3-2 \sin (e+f x))^{-1-m} (1+\sin (e+f x))^m \, dx=\frac {\cos (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-m,1-m,\frac {2 (3-2 \sin (e+f x))}{1+\sin (e+f x)}\right ) (3-2 \sin (e+f x))^{-m} \sqrt {-\frac {1-\sin (e+f x)}{1+\sin (e+f x)}} (1+\sin (e+f x))^m}{\sqrt {5} f m (1-\sin (e+f x))} \]
1/5*cos(f*x+e)*hypergeom([1/2, -m],[1-m],2*(3-2*sin(f*x+e))/(1+sin(f*x+e)) )*(1+sin(f*x+e))^m*((-1+sin(f*x+e))/(1+sin(f*x+e)))^(1/2)/f/m/((3-2*sin(f* x+e))^m)/(1-sin(f*x+e))*5^(1/2)
Result contains complex when optimal does not.
Time = 9.24 (sec) , antiderivative size = 270, normalized size of antiderivative = 2.37 \[ \int (3-2 \sin (e+f x))^{-1-m} (1+\sin (e+f x))^m \, dx=-\frac {\operatorname {Hypergeometric2F1}\left (1+m,1+2 m,2 (1+m),\frac {4 \sqrt {5} (1-i \cos (e+f x)+\sin (e+f x))}{\left (5+\sqrt {5}\right ) \left (-3+\sqrt {5}-2 i \cos (e+f x)+2 \sin (e+f x)\right )}\right ) (3-2 \sin (e+f x))^{-1-m} \left (3+\sqrt {5}+2 i \cos (e+f x)-2 \sin (e+f x)\right ) (1+\sin (e+f x))^m (i \cos (e+f x)+\sin (e+f x)) \left (\frac {\left (-5+\sqrt {5}\right ) \left (3+\sqrt {5}+2 i \cos (e+f x)-2 \sin (e+f x)\right )}{-3+\sqrt {5}-2 i \cos (e+f x)+2 \sin (e+f x)}\right )^m (\cos (e+f x)+i (1+\sin (e+f x))) \left (\cosh \left (m \log \left (5+\sqrt {5}\right )\right )-\sinh \left (m \log \left (5+\sqrt {5}\right )\right )\right )}{\left (5+\sqrt {5}\right ) f (1+2 m)} \]
-((Hypergeometric2F1[1 + m, 1 + 2*m, 2*(1 + m), (4*Sqrt[5]*(1 - I*Cos[e + f*x] + Sin[e + f*x]))/((5 + Sqrt[5])*(-3 + Sqrt[5] - (2*I)*Cos[e + f*x] + 2*Sin[e + f*x]))]*(3 - 2*Sin[e + f*x])^(-1 - m)*(3 + Sqrt[5] + (2*I)*Cos[e + f*x] - 2*Sin[e + f*x])*(1 + Sin[e + f*x])^m*(I*Cos[e + f*x] + Sin[e + f *x])*(((-5 + Sqrt[5])*(3 + Sqrt[5] + (2*I)*Cos[e + f*x] - 2*Sin[e + f*x])) /(-3 + Sqrt[5] - (2*I)*Cos[e + f*x] + 2*Sin[e + f*x]))^m*(Cos[e + f*x] + I *(1 + Sin[e + f*x]))*(Cosh[m*Log[5 + Sqrt[5]]] - Sinh[m*Log[5 + Sqrt[5]]]) )/((5 + Sqrt[5])*f*(1 + 2*m)))
Time = 0.27 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {3042, 3267, 142}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (3-2 \sin (e+f x))^{-m-1} (\sin (e+f x)+1)^m \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (3-2 \sin (e+f x))^{-m-1} (\sin (e+f x)+1)^mdx\) |
\(\Big \downarrow \) 3267 |
\(\displaystyle \frac {\cos (e+f x) \int \frac {(3-2 \sin (e+f x))^{-m-1} (\sin (e+f x)+1)^{m-\frac {1}{2}}}{\sqrt {1-\sin (e+f x)}}d\sin (e+f x)}{f \sqrt {1-\sin (e+f x)} \sqrt {\sin (e+f x)+1}}\) |
\(\Big \downarrow \) 142 |
\(\displaystyle \frac {\sqrt {-\frac {1-\sin (e+f x)}{\sin (e+f x)+1}} \cos (e+f x) (3-2 \sin (e+f x))^{-m} (\sin (e+f x)+1)^m \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-m,1-m,\frac {2 (3-2 \sin (e+f x))}{\sin (e+f x)+1}\right )}{\sqrt {5} f m (1-\sin (e+f x))}\) |
(Cos[e + f*x]*Hypergeometric2F1[1/2, -m, 1 - m, (2*(3 - 2*Sin[e + f*x]))/( 1 + Sin[e + f*x])]*Sqrt[-((1 - Sin[e + f*x])/(1 + Sin[e + f*x]))]*(1 + Sin [e + f*x])^m)/(Sqrt[5]*f*m*(3 - 2*Sin[e + f*x])^m*(1 - Sin[e + f*x]))
3.7.27.3.1 Defintions of rubi rules used
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) )^(p_), x_] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^n*((e + f*x)^(p + 1)/((b*e - a*f)*(m + 1)))*Hypergeometric2F1[m + 1, -n, m + 2, (-(d*e - c*f))*((a + b*x)/((b*c - a*d)*(e + f*x)))])/((b*e - a*f)*((c + d*x)/((b*c - a*d)*(e + f *x))))^n, x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && EqQ[m + n + p + 2, 0] && !IntegerQ[n]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + ( f_.)*(x_)])^(n_.), x_Symbol] :> Simp[a^2*(Cos[e + f*x]/(f*Sqrt[a + b*Sin[e + f*x]]*Sqrt[a - b*Sin[e + f*x]])) Subst[Int[(a + b*x)^(m - 1/2)*((c + d* x)^n/Sqrt[a - b*x]), x], x, Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m , n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && !IntegerQ[m]
\[\int \left (3-2 \sin \left (f x +e \right )\right )^{-1-m} \left (\sin \left (f x +e \right )+1\right )^{m}d x\]
\[ \int (3-2 \sin (e+f x))^{-1-m} (1+\sin (e+f x))^m \, dx=\int { {\left (\sin \left (f x + e\right ) + 1\right )}^{m} {\left (-2 \, \sin \left (f x + e\right ) + 3\right )}^{-m - 1} \,d x } \]
\[ \int (3-2 \sin (e+f x))^{-1-m} (1+\sin (e+f x))^m \, dx=\int \left (3 - 2 \sin {\left (e + f x \right )}\right )^{- m - 1} \left (\sin {\left (e + f x \right )} + 1\right )^{m}\, dx \]
\[ \int (3-2 \sin (e+f x))^{-1-m} (1+\sin (e+f x))^m \, dx=\int { {\left (\sin \left (f x + e\right ) + 1\right )}^{m} {\left (-2 \, \sin \left (f x + e\right ) + 3\right )}^{-m - 1} \,d x } \]
\[ \int (3-2 \sin (e+f x))^{-1-m} (1+\sin (e+f x))^m \, dx=\int { {\left (\sin \left (f x + e\right ) + 1\right )}^{m} {\left (-2 \, \sin \left (f x + e\right ) + 3\right )}^{-m - 1} \,d x } \]
Timed out. \[ \int (3-2 \sin (e+f x))^{-1-m} (1+\sin (e+f x))^m \, dx=\int \frac {{\left (\sin \left (e+f\,x\right )+1\right )}^m}{{\left (3-2\,\sin \left (e+f\,x\right )\right )}^{m+1}} \,d x \]